package cn.elwy.rcp.ui.table.setting.listener;

import org.eclipse.jface.viewers.CheckStateChangedEvent;

import cn.elwy.rcp.ui.table.listener.TablePaneCheckStateListener;
import cn.elwy.rcp.ui.table.model.ColumnInfo;

public class ColumnSettingCheckStateListener extends TablePaneCheckStateListener {

  public ColumnSettingCheckStateListener() {
  }

  @Override
  public void checkStateChanged(CheckStateChangedEvent event) {
    Object element = event.getElement();
    if (element instanceof ColumnInfo) {
      ColumnInfo column = (ColumnInfo) element;
      column.setVisible(event.getChecked());
    }
  }

}
